package com.hrms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hrms.common.AjaxResult;
import com.hrms.domain.Department;
import com.hrms.service.DepartmentService;
import com.hrms.mapper.DepartmentMapper;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 15770
* @description 针对表【t_department】的数据库操作Service实现
* @createDate 2024-12-17 21:55:50
*/
@Service
public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Department>
    implements DepartmentService{

    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public List<Department> selectDepartmentList(Department department) {
        return departmentMapper.selectDepartmentList(department);
    }

    @Override
    public Department selectDepartmentByDeptNo(Long deptNo) {
        return departmentMapper.selectDepartmentByDeptNo(deptNo);
    }

    @Override
    public int insertDepartment(Department department) {
        return departmentMapper.insert(department);
    }

    @Override
    public int updateDepartment(Department department) {
        return departmentMapper.updateById(department);
    }

    @Override
    public int deleteDepartmentByDeptNos(Long[] deptNos) {
        return departmentMapper.deleteDepartmentByDeptNos(deptNos);
    }
}




